<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/4/7
  Time: 11:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script>
        var time = 5;
        window.onload = function (){
            setInterval(refresh,1000);
        }
        function refresh(){
            document.getElementById("waitTime").innerText = time;
            if (time < 1){
                location.href = "login.jsp";
            }
            time--;
        }
    </script>
</head>
<body>
    <h1>还未登录，<span id="waitTime">5</span>秒后跳转至登录界面，也可以点击<a href="login.jsp">登录</a></h1>
</body>
</html>
